<template>
  <div>
    <CTable :title="title" :columns="columns" :data="list" :edit="edit">
      <template v-slot:button>
        <el-button>新增</el-button>
      </template>
      <template #opt="{ row }">
        <a href="">编辑</a>
        <a v-if="row.edit" href="">删除</a>
      </template>
    </CTable>
  </div>
</template>
<script setup lang="ts">
import CTable from '@/components/CTable/CTable.vue'
import { useBizStore } from '@/store/modules/biz'
import { translateDict } from '@/utils/dict'
const props = defineProps(['typebCode', 'name'])
const store = useBizStore(props.typebCode ? props.typebCode : '')()
const list = computed(() => {
  return store[props.name]?.tableList
})
const edit = computed(() => {
  return store[props.name + 'Edit']?.propOwnerListEdit
})
const columns = [
  { label: '申请人姓名', prop: 'name', myType: 'el-input' },
  { label: '申请人类别', prop: 'type' },
  { label: '共有份额', prop: 'ownType' },
  { label: '证件类型', prop: 'cardType', formatter: translateDict('ZJLX_DM') },
  { label: '证件号码', prop: 'cardNo' },
  { label: '联系电话', prop: 'phone' },
  { label: '操作', prop: 'opt', myType: 'slot', slotName: 'opt' }
]
const title = '权属信息'
</script>

<style lang="scss" scoped></style>
